//
//  IGListBaseVC.h
//  MCCSframework
//
//  Created by qq on 2019/8/6.
//  Copyright © 2019 yhy. All rights reserved.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN
@class SubController;
@class IGListCollectionView;
@class IGListSectionController;
@class IGListAdapter;
@protocol IGListAdapterDataSource;
@class IGListCollectionContext;
@class SpaceSplitterSC;

@interface BaseController : UIViewController<IGListAdapterDataSource>
@property (strong, nonatomic) IGListCollectionView* collectionView;
@property (nonatomic , strong ) NSMutableArray<SubController*>* subControllers;// collection view 数据源
@property (strong, nonatomic) IGListAdapter* adapter;

/// 添加 SubController (包括它的 children）
-(void)addSC:(SubController*)sc;
/// 移除 SubController (包括它的 children）
-(void)rmSC:(SubController*)sc;
/// 插入一个 SubController（包括它的 children）到指定 SubController 之后
-(void)insSC:(SubController*)sc after:(SubController*)after;
/// 在指定索引位置插入 SubController（包括它的 children）
-(void)insSC:(SubController*)sc atIndex:(NSInteger)i;

-(SpaceSplitterSC*)spacer:(CGFloat)height;
-(SpaceSplitterSC*)spacer:(CGFloat)height color:(UIColor*)color;

@end

NS_ASSUME_NONNULL_END
